<?/*******************************/$sql->query("delete from ".CFG_MYSQL_PREFIX."calendrier_raid_compo where idPlayer not in (select id from ".CFG_MYSQL_PREFIX."player)");/*******************************/
if(isset($_REQUEST["action"])){	if($_REQUEST["action"]=="enregistrer_configuration"){				foreach($_REQUEST as $param=>$valeur){			if(substr($param,0,4)=="cfg_"){				if(is_array($valeur)){					$tmp="";					foreach($valeur as $val) $tmp.=",".$val;					$sql->query("update ".CFG_MYSQL_PREFIX."module_config set valeur='".substr($tmp,1)."' where module='calendrier_raids' and nom='".substr($param,4)."'");								}else{					$sql->query("update ".CFG_MYSQL_PREFIX."module_config set valeur='".$valeur."' where module='calendrier_raids' and nom='".substr($param,4)."'");				}			}		}			}}if(!isset($_REQUEST["ts"])){	if(!isset($_SESSION["calendrier_ts"])) $ts=time();	else $ts=$_SESSION["calendrier_ts"];}else{	$ts=$_REQUEST["ts"];	$_SESSION["calendrier_ts"]=$_REQUEST["ts"];}

$nb_jours=date("t",$ts);

switch(date("w",mktime(0,0,0,date("n",$ts),1,date("Y",$ts)))){
	case 0: $jour_deb=6; break;
	case 1: $jour_deb=0; break;
	case 2: $jour_deb=1; break;
	case 3: $jour_deb=2; break;
	case 4: $jour_deb=3; break;
	case 5: $jour_deb=4; break;
	case 6: $jour_deb=5; break;
}

